# VARIABLES --------------------------------------------------------------------
# This file includes list of variables that are used in the models. 
# There are three main lists used in the models:
#   - Base: Includes only the treatments
#   - Adjusted: Includes treatments and covariates
#   - Full" Includes treatments, covariates, and moderators

# Variables used in the main models
controls <- c("age_log", 
              "female", 
              "white", 
              "college", 
              "veteran", 
              "employed", 
              "income_imputed",
              #"trust_gov",
              "news_freq",
              "know_total",
              "attn_check",
              "order")

moderators <- c("party",
                "ci_high", 
                "mi_high", 
                "iso_high", 
                countries_imputed)

var_base <- treatments
var_adj <- append(var_base, controls)
var_full <- append(var_adj, moderators)

var_ind <- list("Base" = var_base, "Adjusted"= var_adj, "Full" = var_full)

# Variables used in models with interaction terms
var_inter <- lapply(var_ind, append, interactions)

# Variables used in models with missing values dropped
var_adj_NA <- append(var_adj[var_adj != "income_imputed"], "income", 8)
var_full_NA <- append(var_adj_NA, c("party", "ci", "mi", "iso", countries))

var_NA <- list("Base"= var_base, "Adjusted" = var_adj_NA, "Full" = var_full_NA)

# List of list of variables used in the models
iv <- list("Main" = var_ind, "Interaction" = var_inter)
